<?php
session_start();

/*%setcsname%*/
$cs_name = 'employees';
/*END*/

include_once "../../boot.php";
include_once $cs_name . "_fields.php";

/*%ClassCrud%*/
class employeeCrud extends CF_Crud_Pdo {
/*END*/


/*%CloseClass%*/
}
/*END*/

/*%ClassProc%*/
class employeeProcessor extends CF_ProcessorCrud {
		/* construct function names for operation
		$run_mode = 'process_' . $mode;
		$pre_mode = 'on_pre_' . $mode;
		$post_mode = 'on_post_' . $mode;
		$after_mode = 'after_' . $mode;
		$error_mode = 'on_error_' . $mode;
		$key_set_mode = 'get_keys_' . $mode;
		$new_set_mode = 'get_new_' . $mode;
		$old_set_mode = 'get_old_' . $mode;
		$ctl_set_mode = 'get_ctl_' . $mode;		
		$flt_set_mode = 'get_flt_' . $mode;			
		*/

	var $theclass = 'Employeeprocessor';
		
	function process_list(){
		header('Location: ../mainpage.php');
	}
/*END*/
// process request to set filter
	function process_filter(){
				$this->GetReqFilters();
				echo json_encode($this->filters);
				
	}





/*%CloseClass%*/
}
/*END*/

/*%ProcSetup%*/
$proc = new employeeProcessor($employees_spec,$cs_name);
$ProcSet['employees'] = $proc;

$sd = new employeeCrud($proc);
$DataSourceSet[$cs_name] = $sd;
$sd->set_processor($proc);
$sd->set_maintable('employees');

$proc->set_maintable('employees');
/*END*/


$proc->set_crud_class($sd);
//$proc->test_crud();
$proc->Run();


//include_once "testtablepdo.php";

?>
